package com.vhall.component.entity.account;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * @author dongsong
 */
@Data
@TableName("admins")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "AdminsEntity对象", description = "管理员表")
public class AdminsEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "admin_id", type = IdType.AUTO)
    @JsonProperty(value = "admin_id")
    private Integer adminId;

    @ApiModelProperty(value = "登录名")
    @JsonProperty(value = "admin_name")
    @TableField("admin_name")
    private String adminName;

    @ApiModelProperty(value = "昵称")
    @JsonProperty(value = "nick_name")
    @TableField("nick_name")
    private String nickName;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "手机号")
    @TableField("mobile")
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "凭证")
    @TableField("token")
    private String token;

    @ApiModelProperty(value = "凭证过期时间")
    @JsonProperty(value = "token_expire")
    @TableField("token_expire")
    private LocalDateTime tokenExpire;

    @ApiModelProperty(value = "角色ID")
    @JsonProperty(value = "role_id")
    @TableField("role_id")
    private Integer roleId;

    @ApiModelProperty(value = "登录ip")
    @JsonProperty(value = "last_ip")
    @TableField("last_ip")
    private String lastIp;

    @ApiModelProperty(value = "最后登录时间")
    @JsonProperty(value = "last_time")
    @TableField("last_time")
    private LocalDateTime lastTime;

    @ApiModelProperty(value = "登入统计")
    @JsonProperty(value = "login_num")
    @TableField("login_num")
    private Integer loginNum;

    @ApiModelProperty(value = "状态:0>禁用,1>正常")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @JsonProperty("created_at")
    @TableField("created_at")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间")
    @JsonProperty("updated_at")
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "删除时间")
    @JsonProperty("deleted_at")
    @TableField("deleted_at")
    private LocalDateTime deletedAt;

    @ApiModelProperty(value = "密盐")
    @JsonProperty("salt")
    @TableField("salt")
    private String salt;


}
